Many of electronic devices support a text entry function by providing a key map including virtual touch keys having a predetermined text key arrangement. If a user is not accustomed to the predetermined text key arrangement, however, the user may feel difficult in entering text using the key map. Furthermore, there is a problem in that a user may not easily select a desired key because the size of a key map applied to a portable device is small. In order to solve such a problem, there is provided a function capable of directly entering text, for example, an electronic handwriting function. However, a conventional electronic device is problematic in that the recognition of text entered using an electronic handwriting function is not accurate.